package com.qumitech.visualnovel.datasource.console;

import com.qumitech.visualnovel.model.dao.console.ActiveRemainUserCount;
import com.qumitech.visualnovel.pubdef.dto.voiceroom.ActivityConfigDTO;
import com.qumitech.visualnovel.pubdef.dto.voiceroom.ActivityDataDTO;
import com.qumitech.visualnovel.pubdef.dto.voiceroom.ActivityRemainDataDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.HashMap;
import java.util.List;

public interface ActivityDataMapper {
    List<ActivityConfigDTO> getActivitiesList(@Param("activityName") String activityName,
                                              @Param("streamerId") Long streamerId,
                                              @Param("startTime") String startTime,
                                              @Param("endTime") String endTime,
                                              @Param("offset") Integer offset,
                                              @Param("limit") Integer limit,
                                              @Param("orderBy") String orderBy,
                                              @Param("orderType") String orderType
    );

    int getActivitiesListCount(@Param("activityName") String activityName,
                               @Param("streamerId") Long streamerId,
                               @Param("startTime") String startTime,
                               @Param("endTime") String endTime);

    void addActivity(ActivityConfigDTO record);

    void updateActivity(ActivityConfigDTO record);

    void deleteActivity(String activityName);

    List<ActivityDataDTO> getActivityUsersList(@Param("activityName") String activityName,
                                               @Param("streamerId") Long streamerId,
                                               @Param("offset") Integer offset,
                                               @Param("limit") Integer limit,
                                               @Param("orderBy") String orderBy,
                                               @Param("orderType") String orderType
    );

    List<HashMap<String,Object>> getActivityUsersListCount(@Param("activityName") String activityName,
                                      @Param("streamerId") Long streamerId);

    List<ActivityRemainDataDTO> getActivityRemainList(@Param("activityName") String activityName,
                                                      @Param("streamerId") Long streamerId,
                                                      @Param("offset") Integer offset,
                                                      @Param("limit") Integer limit,
                                                      @Param("orderBy") String orderBy,
                                                      @Param("orderType") String orderType
    );


}
